package com.hjm.project.agentAysinfo.agentAysinfo.service.impl;

import com.hjm.common.utils.text.Convert;
import com.hjm.project.agentAysinfo.agentAysinfo.domain.AgentAysinfo;
import com.hjm.project.agentAysinfo.agentAysinfo.mapper.AgentAysinfoMapper;
import com.hjm.project.agentAysinfo.agentAysinfo.service.IAgentAysinfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 代理商推送配置Service业务层处理
 * 
 * @author maker-platform
 * @date 2024-05-13
 */
@Service
public class AgentAysinfoServiceImpl implements IAgentAysinfoService {
    @Resource
    private AgentAysinfoMapper agentAysinfoMapper;

    /**
     * 查询代理商推送配置
     * 
     * @param id 代理商推送配置ID
     * @return 代理商推送配置
     */
    @Override
    public AgentAysinfo selectAgentAysinfoById(String id) {
        return agentAysinfoMapper.selectAgentAysinfoById(id);
    }

    /**
     * 查询代理商推送配置列表
     * 
     * @param agentAysinfo 代理商推送配置
     * @return 代理商推送配置
     */
    @Override
    public List<AgentAysinfo> selectAgentAysinfoList(AgentAysinfo agentAysinfo) {
        return agentAysinfoMapper.selectAgentAysinfoList(agentAysinfo);
    }

    /**
     * 查询代理商推送配置列表
     *
     * @param agentAysinfo 代理商推送配置
     * @return 代理商推送配置 一个结果
     */
    @Override
    public AgentAysinfo selectAgentAysinfoOne(AgentAysinfo agentAysinfo) {
        return agentAysinfoMapper.selectAgentAysinfoOne(agentAysinfo);
    }

    /**
     * 新增代理商推送配置
     * 
     * @param agentAysinfo 代理商推送配置
     * @return 结果
     */
    @Override
    public int insertAgentAysinfo(AgentAysinfo agentAysinfo) {
        return agentAysinfoMapper.insertAgentAysinfo(agentAysinfo);
    }

    /**
     * 修改代理商推送配置
     * 
     * @param agentAysinfo 代理商推送配置
     * @return 结果
     */
    @Override
    public int updateAgentAysinfo(AgentAysinfo agentAysinfo) {
        return agentAysinfoMapper.updateAgentAysinfo(agentAysinfo);
    }

    /**
     * 删除代理商推送配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAgentAysinfoByIds(String ids) {
        return agentAysinfoMapper.deleteAgentAysinfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除代理商推送配置信息
     * 
     * @param agentUrl 代理商推送配置ID
     * @return 结果
     */
    @Override
    public int deleteAgentAysinfoById(String agentUrl) {
        return agentAysinfoMapper.deleteAgentAysinfoById(agentUrl);
    }
}
